package com.ssm.demo.service.impl.manageruser;

import java.util.List;

import javax.annotation.PostConstruct;
import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ssm.demo.dao.manageruser.IManagerUserDao;
import com.ssm.demo.model.ManagerUser;
import com.ssm.demo.service.impl.BaseServiceImpl;
import com.ssm.demo.service.manageruser.IManagerUserService;

/**
 * 
 * @ClassName: ManagerUserServiceImpl 
 * @Description: ManagerUserServiceImpl
 * @author Yin Qingsheng 
 * @date 2018年12月21日 上午11:21:28 
 *
 */
@Service
@Transactional
public class ManagerUserServiceImpl extends BaseServiceImpl<ManagerUser> implements IManagerUserService {

	/**
	 * imanagerUserDao
	 */
	//@Resource
	@Autowired
	private IManagerUserDao imanagerUserDao;
	
	/**
	 * 注入基础实现
	 */
	@PostConstruct
	private void postConstruct(){
		baseIdo = imanagerUserDao;
	}
	
	/**
	 * 
	 * @Title: findByLoginNameAndPassword
	 * @Description: 按登录名和密码查询用户
	 * @param loginName
	 * @param password
	 * @return
	 * @return ManagerUser
	 * @author Yin Qingsheng
	 * @date 2018年12月20日 下午2:48:22
	 * @throws
	 */
	@Override
	public ManagerUser findByLoginNameAndPassword(String loginName, String password) {
		return imanagerUserDao.findByLoginNameAndPassword(loginName, password);
	}
	
	/**
	 * @Title: query
	 * @Description: 查询方法
	 * @param queryName 自定义查询字段名字
	 * @param queryValue 查询值
	 * @return
	 */
	@Override
	public List<ManagerUser> query(String queryName, String queryValue) {
		return imanagerUserDao.query(queryName, queryValue);
	}

}
